<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.qiqianyi.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\company\validate;

use app\admin\model\RouteModel;
use think\Validate;

class CompanyValidate extends Validate
{
    protected $rule = [
        'category_id'  => 'require',
        'nature_id'  => 'require',
        'name'  => 'require',
        'short_name'  => 'require',

        'person_count'  => 'require|integer',
        'contact_person'  => 'require',
        'contact_person_phone'  => 'require',
        'contact_person_sex'  => 'require',
        'contact_person_job'  => 'require',
    ];
    protected $message = [
        'name.require' => '企业名称不能为空',
        'category_id.require' => '企业分类不能为空',
        'nature_id.require' => '企业性质不能为空',
        'short_name.require' => '企业简称不能为空',
        'person_count.require' => '员工人数不能为空',
        'person_count.integer' => '员工人数必须为数字',
        'contact_person.require' => '联系人不能为空',
        'contact_person_phone.require' => '联系电话不能为空',
        'contact_person_sex.require' => '性别不能为空',
        'contact_person_job.require' => '联系人职位不能为空',
    ];

    protected $scene = [
//        'add'  => ['user_login,user_pass,user_email'],
//        'edit' => ['user_login,user_email'],
    ];


}